package com.zb.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zb.entity.ZjWorkDetail;
import com.zb.mapper.ZjWorkDetailMapper;
import com.zb.service.ZjWorkDetailService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 工单信息表 服务实现类
 * </p>
 *
 * @author WEN
 * @since 2023-09-20
 */
@Service
public class ZjWorkDetailServiceImpl extends ServiceImpl<ZjWorkDetailMapper, ZjWorkDetail> implements ZjWorkDetailService {
    @Resource
    private ZjWorkDetailMapper workDetailMapper;


    // 根据处理方式ID查询
    @Override
    public List<Long> getByWayIds(List<Long> wayIds) {
        return workDetailMapper.getByWayIds(wayIds);
    }

    // 根据分类ID获取
    @Override
    public List<Long> getByTypeIds(List<Long> typeIds) {
        return workDetailMapper.getByTypeIds(typeIds);
    }

    // 根据服务人员ID获取未预约工单数量
    @Override
    public long getNotReservationOrderQty(Long custAccId, Long networkId, Long networkEmpId) {
        return workDetailMapper.getNotReservationOrderQty(custAccId, networkId, networkEmpId);
    }

    // 清除工单派单到服务商的时间
    @Override
    public void updateDispatchTimeById(Long id) {
        workDetailMapper.updateDispatchTimeById(id);
    }

    // 根据工单ID更新工单事件
    @Override
    public void updateOrderEventById(ZjWorkDetail detail) {
        workDetailMapper.updateOrderEventById(detail);
    }
}
